<template>
	<view class="u-page">
		<userheader ref="userheader" :post="{}" page="driver" v-on:onGetUserinfo="onGetUserinfo"/>
		<view class="container">
			<view class="item">
				<view class="title">
					我的贸易商
				</view>
				<view class="info">
					<view class="line">
						<text class="tag-info" v-for="item in channel">{{item.title}}</text>
					</view>		
				</view>
			</view>
			<view class="item">
				<view class="title">
					我的客户
				</view>
				<view class="info" @click="goKehu">
					<view class="line">
						{{customer}}家
						<view class="rightbox">
							<u-icon name="arrow-right"></u-icon>
						</view>
					</view>		
				</view>
			</view>
		</view>	
		<driverbar name="index"/>
	</view>
</template>

<script>
	import {baseUrl,methods} from '@/utils/methods.js';
	import Driverbar from './driverbar.vue';
	import userheader from '@/pages/components/userheader';
	export default {
		components: {
			userheader,Driverbar
		},
		data() {
			return {
				channel:'',
				customer:''
			}
		},
		onLoad() {
			
		}, 
		methods: {
			...methods,
			onGetUserinfo:function(e){
				this.channel=e.channel;
				this.customer=e.customer;
			},
			goKehu:function(){
				this.$navigateTo('driver/store');
			}
		}
	}
</script>

<style lang="scss">
	.u-page{
		background: #eeeeee;
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		right: 0;
	}
	.container{
		padding: 0 20rpx;
	}
	.item{
		padding: 10rpx;
		background-color: rgba(48, 216, 231, 0.3);
		font-size: 26rpx;	
		margin-bottom: 10rpx;
		.title{
			padding: 10rpx 0;
			font-weight: bold;
			font-size: 30rpx;
		}
		.info{			
			background-color: #fff;
			overflow: hidden;
			.line{
				height: 70rpx;
				line-height: 70rpx;
				padding: 0 20rpx;
				border-bottom: 1px solid #f1f1f1;
				position: relative;
			}
			.line:last-child{
				border-bottom:0;
			}
			.qrcode{
				text-align: center;
				padding: 20rpx;
				image{
					width: 300rpx;
					height: 300rpx;
				}
			}
			.rightbox{
				position: absolute;
				right: 10rpx;
				top:20rpx;
			}
		}
	}
</style>